<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <style>
      div {
        color: black;
      }
      div.user > h2 {
        color: red;
      }

      div.user > h2 + section h2 {
        color: blue;
      }
    </style>
    <div class="user">
      <h2>小明</h2>
      <section>
        <h2>张三</h2>
        <span> yahoo </span>
      </section>
      <section>
        <h1>王五</h1>
        <span>tom</span>
      </section>
    </div>
  </body>
</html>
